package cn.itsource.pojo.vo;

import cn.itsource.domain.Login;
import lombok.Data;

@Data
public class AppLoginVo {
    private String username;
    private String avatar;
    private String nickName;
    private String phone;
    private String token;
    private Long id;
    
    public static AppLoginVo toAppLoginInfo(Login login, String token){
        AppLoginVo appLoginVo = new AppLoginVo();
        appLoginVo.setUsername(login.getUsername());
        appLoginVo.setAvatar(login.getAvatar());
        appLoginVo.setNickName(login.getNickName());
        appLoginVo.setPhone(login.getPhone());
        appLoginVo.setToken(token);
        appLoginVo.setId(login.getId());
        return appLoginVo;
    }
}
